export default function ({ route, store, from, redirect, $log }) {
  // if (/^\/admin(\/.*)?$/.test(route.fullPath)) {
  //   if (route.path !== '/admin/login') {
  //     $log('No authentication, Will redirect to login')
  //     redirect('/admin/login')
  //   } else {
  //     $log('Authentication OK')
  //   }
  // }
  if (!store.state.admin.user) {
    $log('no login')
  } else {
    $log('login ok')
  }
}
